/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class TiendaCriteria extends AbstractORMCriteria {
	public final IntegerExpression idTienda;
	public final StringExpression nombreTienda;
	public final StringExpression direccionCentral;
	public final IntegerExpression rol;
	public final IntegerExpression RUT;
	
	public TiendaCriteria(Criteria criteria) {
		super(criteria);
		idTienda = new IntegerExpression("idTienda", this);
		nombreTienda = new StringExpression("nombreTienda", this);
		direccionCentral = new StringExpression("direccionCentral", this);
		rol = new IntegerExpression("rol", this);
		RUT = new IntegerExpression("RUT", this);
	}
	
	public TiendaCriteria(PersistentSession session) {
		this(session.createCriteria(Tienda.class));
	}
	
	public TiendaCriteria() throws PersistentException {
		this(orm.MarketFrogPersistentManager.instance().getSession());
	}
	
	public EmpresaCriteria createEmpresaidEmpresaCriteria() {
		return new EmpresaCriteria(createCriteria("empresaidEmpresa"));
	}
	
	public SucursalCriteria createSucursalCriteria() {
		return new SucursalCriteria(createCriteria("ORM_Sucursal"));
	}
	
	public Tienda uniqueTienda() {
		return (Tienda) super.uniqueResult();
	}
	
	public Tienda[] listTienda() {
		java.util.List list = super.list();
		return (Tienda[]) list.toArray(new Tienda[list.size()]);
	}
}

